<%# PARTIAL: USER_INFO
This partial is to render the 'User Info Bar' found just under the site's header.

It should contain some sort of greeting for guests, users, admins, should contain quick login fields, and will also render the flash[:notice] messages here.

LOCALS
:user - nil if not logged in, otherwise an instance of User
:notice - the flash[:notice]
%>
<%# RENDER QUICK LOGIN IF NOT LOGGED IN%>
<% if user.nil? %>
	<div id="login_logout">
		<span>
		<%= link_to "register", {:controller => 'users', :action => 'new'} -%>
		</span>
		<% form_tag({:controller => "admin", :action => "login"}) do %>
			<fieldset> 
					<label for="name">Name:</label> <%= text_field_tag :nickName, params[:nickName], :size => 10 %>
					<label for="password">Password:</label> <%= password_field_tag :password, params[:password], :size => 10 %>
					<%= submit_tag "Login" %>

			</fieldset>
			<% end %>
		</div>	
<%end%>

<%# RENDER WELCOME MESSAGE / FLASH MESSAGES %>
<% unless notice.nil?%>
	<div id = "flash_notice"><p><%= notice %></p></div>
<% end %>

<div id="user_greeting">
	<% unless user.nil? %>	
		<p>logged in as <b><%= user.firstName+" "+user.name %></b>
		<% if !(user.isAdmin?)%>
			<%= link_to "Logout", {:controller => 'admin', :action => 'logout'} %>
		<%end%>
		</p>
		<%= render(:partial => "shared/user_tabs", :locals => {:user => user})%>
		
	<% end %>
</div>


<%= clear_floats %>


